/**
 * Created by Administrator on 2015/11/26.
 */
window.onload=function(){
    function css(obj,name,value){
        if(arguments.length==2){//两个参数
            return obj.style[name];
        }
        else//三个参数
        {
            obj.style[name]=value;
        }
    }
    /*搜索框*/
    var oTxt=document.getElementsByClassName('search-text')[0];
    oTxt.onfocus=function(){
        if(this.value=='搜索菜谱、食材...')
            this.value='';
    }
    oTxt.onblur=function(){
        if(this.value==''){
            this.value='搜索菜谱、食材...';
        }
    }

}
